Skip to content

Fix integer overflow in _checkCount(minimum:) - #60

Merged
natecook1000 merged 1 commit into
mainfrom
fix/checkcount-overflow
Aug 17, 2026
Merged

Fix integer overflow in _checkCount(minimum:)#60
natecook1000 merged 1 commit into
mainfrom
fix/checkcount-overflow

Conversation

@natecook1000

Copy link
Copy Markdown
Member

The current implementation adds the given minimum and _lowerBound, which can wrap around if the minimum is very large, incorrectly passing the size check. This change uses count instead, which is always the real upper bound for minimum.

Checklist

  • I've added at least one test that validates that my change is working, if appropriate
  • I've followed the code style of the rest of the project
  • I've run Scripts/format.sh to correctly format my change
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary

The current implementation adds the given `minimum` and
`_lowerBound`, which can wrap around if the minimum is
very large, incorrectly passing the size check. This change
uses `count` instead, which is always the real upper bound for
`minimum`.
@natecook1000
natecook1000 force-pushed the fix/checkcount-overflow branch from b51c640 to 3224cd4 Compare August 17, 2026 21:37
@natecook1000
natecook1000 merged commit 69c1f28 into main Aug 17, 2026
26 checks passed
@natecook1000
natecook1000 deleted the fix/checkcount-overflow branch August 17, 2026 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant